<?php
//定义数组array
$save=array(1,2,4,5,6,7,8,9);

echo $save[2];
echo '<hr/>';
print_r($save);

//定义关联数组
$my=['id'=>20,'name'=>'zhangsan','tel'=>'13762569112'];
echo $my['name'];
echo '<hr/>';

print_r($my);
echo '<hr/>';

//遍历数组
for($i = 0; $i < count($save); $i++){
    echo $save[$i], ' ';
}

print '<br />';

//遍历集合
foreach ($my as $key => $value) {
    echo $key . ': ' . $value . '<br/>';
}